package testsw.order.feign.Fallback;

import com.github.pagehelper.PageInfo;
import com.testsw.order.pojo.Reporttable;
import entity.Result;
import entity.StatusCode;
import org.springframework.stereotype.Component;
import testsw.order.feign.ReporttableFeign;

import java.util.List;

@Component
public class ReporttableFallback implements ReporttableFeign {
    @Override
    public Result<PageInfo> findPage(Reporttable reporttable, int page, int size) {
       return  new Result(true,StatusCode.OK,"查询成功","findPage===Reporttable reporttable, int page, int size");
    }

    @Override
    public Result<PageInfo> findPage(int page, int size) {
        return new Result(true,StatusCode.OK,"查询成功","findPage====int page, int size");
    }

    @Override
    public Result<List<Reporttable>> findList(Reporttable reporttable) {
        return new Result<List<Reporttable>>(true,StatusCode.OK,"查询成功","findList(Reporttable reporttable)");
    }

    @Override
    public Result delete(Integer id) {
        return new Result<>(true,StatusCode.OK,"查询成功","delete(Integer id)");
    }

    @Override
    public Result update(Reporttable reporttable, Integer id) {
        return new Result<>(true,StatusCode.OK,"查询成功","update(Reporttable reporttable, Integer id)");
    }

    @Override
    public Result add(Reporttable reporttable) {
        return new Result<>(true,StatusCode.OK,"查询成功","Result add(Reporttable reporttable)");
    }

    @Override
    public Result<Reporttable> findById(Integer id) {
        return new Result<>(true,StatusCode.OK,"查询成功","Result add(Reporttable reporttable)");
    }

    @Override
    public Result<List<Reporttable>> findAll() {
        return new Result<>(true,StatusCode.OK,"查询失败","请稍后重试");
    }
}
